<?php

class Zend_View_Helper_Estrelas extends Zend_View_Helper_Url {



    public function estrelas($valor) {
        $html = '';
        $i = 1;
        
        if ($valor == 0){
            $html .= "<i class='glyphicon glyphicon-star-empty'></i>";
            ++$i;
        }
        
        for ($i ; $i <= 5; $i++){
            if ($i <= $valor)
                $html .= "<i class='glyphicon glyphicon-star'></i>";
            else
                $html .= "<i class='glyphicon glyphicon-star-empty'></i>";
        }

        return "<span>" . $html . "</span>"; 
    }


}


